cmake_minimum_required(VERSION 3.10)

project(boostAsyncServer LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

#指定boost库的路径
set(BOOST_ROOT "/usr/local/hslDir/mylib/boost")

find_package(Boost REQUIRED COMPONENTS system thread)


#读取src目录下的所有源文件
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)


add_executable(boostAsyncServer main.cc ${SOURCES})

#添加include目录
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

target_include_directories(boostAsyncServer PUBLIC ${Boost_INCLUDE_DIRS})


target_link_libraries(boostAsyncServer PUBLIC ${Boost_LIBRARIES})


